/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.portlet.model;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link role}.
 * </p>
 *
 * @author    Thi
 * @see       role
 * @generated
 */
public class roleWrapper implements role, ModelWrapper<role> {
	public roleWrapper(role role) {
		_role = role;
	}

	public Class<?> getModelClass() {
		return role.class;
	}

	public String getModelClassName() {
		return role.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("maRole", getMaRole());
		attributes.put("tenRole", getTenRole());
		attributes.put("ghiChu", getGhiChu());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		String maRole = (String)attributes.get("maRole");

		if (maRole != null) {
			setMaRole(maRole);
		}

		String tenRole = (String)attributes.get("tenRole");

		if (tenRole != null) {
			setTenRole(tenRole);
		}

		String ghiChu = (String)attributes.get("ghiChu");

		if (ghiChu != null) {
			setGhiChu(ghiChu);
		}
	}

	/**
	* Returns the primary key of this role.
	*
	* @return the primary key of this role
	*/
	public java.lang.String getPrimaryKey() {
		return _role.getPrimaryKey();
	}

	/**
	* Sets the primary key of this role.
	*
	* @param primaryKey the primary key of this role
	*/
	public void setPrimaryKey(java.lang.String primaryKey) {
		_role.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the ma role of this role.
	*
	* @return the ma role of this role
	*/
	public java.lang.String getMaRole() {
		return _role.getMaRole();
	}

	/**
	* Sets the ma role of this role.
	*
	* @param maRole the ma role of this role
	*/
	public void setMaRole(java.lang.String maRole) {
		_role.setMaRole(maRole);
	}

	/**
	* Returns the ten role of this role.
	*
	* @return the ten role of this role
	*/
	public java.lang.String getTenRole() {
		return _role.getTenRole();
	}

	/**
	* Sets the ten role of this role.
	*
	* @param tenRole the ten role of this role
	*/
	public void setTenRole(java.lang.String tenRole) {
		_role.setTenRole(tenRole);
	}

	/**
	* Returns the ghi chu of this role.
	*
	* @return the ghi chu of this role
	*/
	public java.lang.String getGhiChu() {
		return _role.getGhiChu();
	}

	/**
	* Sets the ghi chu of this role.
	*
	* @param ghiChu the ghi chu of this role
	*/
	public void setGhiChu(java.lang.String ghiChu) {
		_role.setGhiChu(ghiChu);
	}

	public boolean isNew() {
		return _role.isNew();
	}

	public void setNew(boolean n) {
		_role.setNew(n);
	}

	public boolean isCachedModel() {
		return _role.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_role.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _role.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _role.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_role.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _role.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_role.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new roleWrapper((role)_role.clone());
	}

	public int compareTo(com.portlet.model.role role) {
		return _role.compareTo(role);
	}

	@Override
	public int hashCode() {
		return _role.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.portlet.model.role> toCacheModel() {
		return _role.toCacheModel();
	}

	public com.portlet.model.role toEscapedModel() {
		return new roleWrapper(_role.toEscapedModel());
	}

	public com.portlet.model.role toUnescapedModel() {
		return new roleWrapper(_role.toUnescapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _role.toString();
	}

	public java.lang.String toXmlString() {
		return _role.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_role.persist();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof roleWrapper)) {
			return false;
		}

		roleWrapper roleWrapper = (roleWrapper)obj;

		if (Validator.equals(_role, roleWrapper._role)) {
			return true;
		}

		return false;
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public role getWrappedrole() {
		return _role;
	}

	public role getWrappedModel() {
		return _role;
	}

	public void resetOriginalValues() {
		_role.resetOriginalValues();
	}

	private role _role;
}